/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package com.pancho;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class PacientDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression idPaciente;
	public final StringExpression RUT;
	public final StringExpression nombre;
	public final StringExpression apellidos;
	public final StringExpression cellPhone;
	
	public PacientDetachedCriteria() {
		super(com.pancho.Pacient.class, com.pancho.PacientCriteria.class);
		idPaciente = new IntegerExpression("idPaciente", this.getDetachedCriteria());
		RUT = new StringExpression("RUT", this.getDetachedCriteria());
		nombre = new StringExpression("nombre", this.getDetachedCriteria());
		apellidos = new StringExpression("apellidos", this.getDetachedCriteria());
		cellPhone = new StringExpression("cellPhone", this.getDetachedCriteria());
	}
	
	public PacientDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, com.pancho.PacientCriteria.class);
		idPaciente = new IntegerExpression("idPaciente", this.getDetachedCriteria());
		RUT = new StringExpression("RUT", this.getDetachedCriteria());
		nombre = new StringExpression("nombre", this.getDetachedCriteria());
		apellidos = new StringExpression("apellidos", this.getDetachedCriteria());
		cellPhone = new StringExpression("cellPhone", this.getDetachedCriteria());
	}
	
	public DiagnoseDetachedCriteria createDiagnoseCriteria() {
		return new DiagnoseDetachedCriteria(createCriteria("diagnose"));
	}
	
	public ResponseDetachedCriteria createResponseCriteria() {
		return new ResponseDetachedCriteria(createCriteria("response"));
	}
	
	public Pacient uniquePacient(PersistentSession session) {
		return (Pacient) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Pacient[] listPacient(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Pacient[]) list.toArray(new Pacient[list.size()]);
	}
}

